#pragma once
#define MAX 1024
#define LINE_FLUSH (1<<1)
#define NONE_FLUSH (1<<0)
#define FULL_FLUSH (1<<2)

typedef struct IO_FILE
{
    char buffer[MAX];
    int fd ;
    int buffer_len;
    int flag ;
    int flush_method;
} My_File;

My_File *MyFopen(const char *path, const char *mode);
void MyFclose(My_File *);
int MyFwrite(My_File *, void *str, int len);
void MyFFlush(My_File *);